/*! * copyright http://v.shoutu.cn * email 726662013@qq.com */ var playerhigh = "1"; //是否开启播放器高度自适应,0关闭1开启(开启后将播放器设置100%关闭填写固定高度) var stui = { 'browser': { url: document.url, domain: document.domain, title: document.title, language: (navigator.browserlanguage || navigator.language).tolowercase(), canvas: function() { return !!document.createelement("canvas").getcontext }(), useragent: function() { var a = navigator.useragent; return { mobile: !! a.match(/applewebkit.*mobile.*/), ios: !! a.match(/\(i[^;]+;( u;)? cpu.+mac os x/), android: -1 < a.indexof("android") || -1 < a.indexof("linux"), iphone: -1 < a.indexof("iphone") || -1 < a.indexof("mac"), ipad: -1 < a.indexof("ipad"), trident: -1 < a.indexof("trident"), presto: -1 < a.indexof("presto"), webkit: -1 < a.indexof("applewebkit"), gecko: -1 < a.indexof("gecko") && -1 == a.indexof("khtml"), weixin: -1 < a.indexof("micromessenger") } }() }, 'flickity': { 'carousel': function() { $('.flickity-item').flickity({ cellalign: 'center', contain: true, wraparound: true, autoplay: true, prevnextbuttons: false }); } }, 'images': { 'lazyload': function() { $(".lazyload").lazyload({ effect: "fadein", threshold: 200, failurelimit: 15, skip_invisible: false }) } }, 'common': { 'history': function() { if($("#stui_history").length){ if($.cookie("recente")){ var json=eval("("+$.cookie("recente")+")"); var list=""; for(i=0;i

"+json[i].vod_name+"

播放至:"+json[i].vod_part+"

继续观看

"; } $("#stui_history").append(list); } else $("#stui_history").append("

您还没有看过影片哦

"); $(".historyclean").on("click",function(){ if(window.confirm('确定要清空记录吗?')){ $.cookie("recente",null,{expires:-1,path: '/'}); }else{ return false; } }); } }, 'dropdown': function() { $(".open-dropdown").on('click',function(){ $(".dropdown-menu").toggle(); }); $(".dropdown-menu li").on('click',function(){ $(".dropdown-menu li.active").removeclass('active'); $(this).addclass('active'); var index = $(this).index(); $(".active-tab").html($(".dropdown-menu li.active").html()) $(".tab-content .tab-pane").eq(index).addclass('active').siblings().removeclass('active'); $(".dropdown-menu").hide(); }); }, 'popup': function() { $popblock = $(".popup"); $(".open-popup").click(function() { $popblock.addclass("popup-visible"); $("body").append('
').css("overflow","hidden"); $(".close-popup").click(function() { $popblock.removeclass("popup-visible"); $(".mask").remove(); $("body").removeclass("modal-open").css("overflow",""); }); $(".mask").click(function() { $popblock.removeclass("popup-visible"); $(this).remove(); $("body").removeclass("modal-open").css("overflow",""); }) }) }, 'slide': function() { $(".type-slide").each(function(a) { $index = $(this).find('.active').index()*1; if($index > 3){ $index = $index-3; }else{ $index = 0; } $(this).flickity({ cellalign: 'left', freescroll: true, contain: true, prevnextbuttons: false, pagedots: false, initialindex: $index }); }) }, 'mshare': function() { $(".open-share").click(function() { stui.browser.useragent.weixin ? $("body").append('
') : $("body").append('
'); $(".mobile-share").click(function() { $(".mobile-share").remove(); $("body").removeclass("modal-open") }) }) }, 'collapse': function() { $(".detail").on("click", ".detail-more", function() { $detailcontent = $(".detail-content"); $detailsketch = $(".detail-sketch"); "none" == $detailcontent.css("display") ? ($(this).html('\u6536\u8d77 '), $detailcontent.show(), $detailsketch.hide()) : ($(this).html('\u8be6\u60c5 '), $detailcontent.hide(), $detailsketch.show()) }) }, 'scrolltop': function() { var a = $(window); $scrolltoplink = $("a.backtop"); a.scroll(function() { 500 < $(this).scrolltop() ? $scrolltoplink.css("display", "block") : $scrolltoplink.css("display", "none") }); $scrolltoplink.on("click", function() { $("html, body").animate({ scrolltop: 0 }, 400); return !1 }) } } }; if(window.console&&window.console.log){ console.log('\u9996\u6d82\u7f51\uff08v.shoutu.cn\uff09\u539f\u521b\u4f5c\u54c1'); console.log('\u4f5c\u8005\uff1a\u5c0f\u4e8c\u54e5\uff0cqq\uff1a726662013'); console.log("%c\u539f\u521b\u4f5c\u54c1\u8bf7\u5c0a\u91cd\u4f5c\u8005\u52b3\u52a8\u6210\u679c\uff0c\u52ff\u5012\u5356\u5206\u4eab\uff0c\u8c22\u8c22\uff01","color:red"); } $(document).ready(function() { stui.flickity.carousel(); stui.images.lazyload(); stui.common.history(); stui.common.dropdown(); stui.common.slide(); stui.common.popup(); stui.common.mshare(); stui.common.collapse(); stui.common.scrolltop(); });